package com.users.feign;


import com.common.common.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

//name 调用rest接口所对应的服务名，
//path 指定调用rest接口所在controller中的@RequestingMapping
@FeignClient(name="emms-store-service", path = "/store")
public interface StoreFeignService {
    //声明需要调用的rest接口对应的方法

    @RequestMapping("/all")
    String findAll();

    @RequestMapping("/{id}")
    String queryById(@PathVariable("id") Integer id);

    @RequestMapping("/port")
    BaseResponse<String> GetPort();

}
